// This is autogenerated file. Do not edit!

package models.autogenerated;

class Posts
{
	var db : orm.Db;
	var orm : models.Orm;
	public var id : String;
	public var content : String;

	public function new(db:orm.Db, orm:models.Orm) : Void
	{
		this.db = db;
		this.orm = orm;
	}

	public function set(content:String) : Void
	{
		this.content = content;
	}

	public function save() : Void
	{
		db.query(
			 'UPDATE `posts` SET '
				+  '`content` = ' + db.quote(content)
			+' WHERE `id` = ' + db.quote(id)
			+' LIMIT 1'
		);
	}
}